package com.huawei_jikao;

import java.util.*;
/**
 * Created by Z-hong on 2024/7/11.
 */

public class HJ1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int count = in.nextInt();
        int arr[]=new int[count];
        for (int i = 0; i < count; i++) {
            arr[i]=in.nextInt();
        }
        int result[] = new int[count];
        for (int i = 0; i < arr.length; i++) {
            for (int j = i+1; j < arr.length; j++) {
                if(arr[j]>arr[i]){
                    result[i]=j;
                    break;
                }
            }

        }
        for (int i = 0; i < result.length; i++) {
            System.out.print(result[i]);
            if(i!= result.length-1){
                System.out.print(" ");
            }
        }

    }
}
